package com.emcom.gotour.mvc.view;

import java.io.Serializable;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang.builder.CompareToBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.springframework.context.MessageSource;

import com.emcom.gotour.mvc.message.MenuMessage;

public class MenuView implements Comparable<Object>, Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -3543842641830041793L;
	private String home;
	private String zhouBian;
	private String guoNei;
	private String chuJing;
	private String jiuDian;
	private String jingDian;
	private String training;
	private String anLi;
	private String chinese;
	private String english;
	private String zhouBianImageUrl;
	private String guoNeiImageUrl;
	private String chuJingImageUrl;
	private String jiuDianImageUrl;
	private String jingDianImageUrl;
	private String trainingImageUrl;
	private String anLiImageUrl;
	public MenuView() {
	}
	public MenuView(HttpServletRequest request, MessageSource messageSource) {
		this.home = MenuMessage.HOME.value(request, messageSource);
		this.zhouBian = MenuMessage.ZHOU_BIAN.value(request, messageSource);
		this.guoNei = MenuMessage.GUO_NEI.value(request, messageSource);
		this.chuJing = MenuMessage.CHU_JING.value(request, messageSource);
		this.jiuDian = MenuMessage.JIU_DIAN.value(request, messageSource);
		this.jingDian = MenuMessage.JING_DIAN.value(request, messageSource);
		this.training = MenuMessage.TRAINING.value(request, messageSource);
		this.anLi = MenuMessage.AN_LI.value(request, messageSource);
		this.chinese = MenuMessage.CHINESE.value(request, messageSource);
		this.english = MenuMessage.ENGLISH.value(request, messageSource);
		this.zhouBianImageUrl = MenuMessage.ZHOU_BIAN_IMAGE_URL.value(request, messageSource);
		this.guoNeiImageUrl = MenuMessage.GUO_NEI_IMAGE_URL.value(request, messageSource);
		this.chuJingImageUrl = MenuMessage.CHU_JING_IMAGE_URL.value(request, messageSource);
		this.jiuDianImageUrl = MenuMessage.JIU_DIAN_IMAGE_URL.value(request, messageSource);
		this.jingDianImageUrl = MenuMessage.JING_DIAN_IMAGE_URL.value(request, messageSource);
		this.trainingImageUrl = MenuMessage.TRAINING_IMAGE_URL.value(request, messageSource);
		this.anLiImageUrl = MenuMessage.AN_LI_IMAGE_URL.value(request, messageSource);
	}
	public String getHome() {
		return home;
	}
	public void setHome(String home) {
		this.home = home;
	}
	public String getZhouBian() {
		return zhouBian;
	}
	public void setZhouBian(String zhouBian) {
		this.zhouBian = zhouBian;
	}
	public String getGuoNei() {
		return guoNei;
	}
	public void setGuoNei(String guoNei) {
		this.guoNei = guoNei;
	}
	public String getChuJing() {
		return chuJing;
	}
	public void setChuJing(String chuJing) {
		this.chuJing = chuJing;
	}
	public String getJiuDian() {
		return jiuDian;
	}
	public void setJiuDian(String jiuDian) {
		this.jiuDian = jiuDian;
	}
	public String getJingDian() {
		return jingDian;
	}
	public void setJingDian(String jingDian) {
		this.jingDian = jingDian;
	}
	public String getTraining() {
		return training;
	}
	public void setTraining(String training) {
		this.training = training;
	}
	public String getAnLi() {
		return anLi;
	}
	public void setAnLi(String anLi) {
		this.anLi = anLi;
	}
	public String getChinese() {
		return chinese;
	}
	public void setChinese(String chinese) {
		this.chinese = chinese;
	}
	public String getEnglish() {
		return english;
	}
	public void setEnglish(String english) {
		this.english = english;
	}
	public String getZhouBianImageUrl() {
		return zhouBianImageUrl;
	}
	public void setZhouBianImageUrl(String zhouBianImageUrl) {
		this.zhouBianImageUrl = zhouBianImageUrl;
	}
	public String getGuoNeiImageUrl() {
		return guoNeiImageUrl;
	}
	public void setGuoNeiImageUrl(String guoNeiImageUrl) {
		this.guoNeiImageUrl = guoNeiImageUrl;
	}
	public String getChuJingImageUrl() {
		return chuJingImageUrl;
	}
	public void setChuJingImageUrl(String chuJingImageUrl) {
		this.chuJingImageUrl = chuJingImageUrl;
	}
	public String getJiuDianImageUrl() {
		return jiuDianImageUrl;
	}
	public void setJiuDianImageUrl(String jiuDianImageUrl) {
		this.jiuDianImageUrl = jiuDianImageUrl;
	}
	public String getJingDianImageUrl() {
		return jingDianImageUrl;
	}
	public void setJingDianImageUrl(String jingDianImageUrl) {
		this.jingDianImageUrl = jingDianImageUrl;
	}
	public String getTrainingImageUrl() {
		return trainingImageUrl;
	}
	public void setTrainingImageUrl(String trainingImageUrl) {
		this.trainingImageUrl = trainingImageUrl;
	}
	public String getAnLiImageUrl() {
		return anLiImageUrl;
	}
	public void setAnLiImageUrl(String anLiImageUrl) {
		this.anLiImageUrl = anLiImageUrl;
	}
	/**
	 * @see java.lang.Comparable#compareTo(Object)
	 */
	public int compareTo(Object object) {
		MenuView myClass = (MenuView) object;
		return new CompareToBuilder().append(this.home, myClass.home).append(
				this.chuJing, myClass.chuJing).append(this.jingDianImageUrl,
				myClass.jingDianImageUrl).append(this.zhouBian,
				myClass.zhouBian).append(this.jingDian, myClass.jingDian)
				.append(this.trainingImageUrl, myClass.trainingImageUrl)
				.append(this.anLi, myClass.anLi).append(this.chinese,
						myClass.chinese).append(this.chuJingImageUrl,
						myClass.chuJingImageUrl).append(this.jiuDian,
						myClass.jiuDian)
				.append(this.training, myClass.training).append(
						this.zhouBianImageUrl, myClass.zhouBianImageUrl)
				.append(this.guoNei, myClass.guoNei).append(
						this.jiuDianImageUrl, myClass.jiuDianImageUrl).append(
						this.guoNeiImageUrl, myClass.guoNeiImageUrl).append(
						this.anLiImageUrl, myClass.anLiImageUrl).append(
						this.english, myClass.english).toComparison();
	}
	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof MenuView)) {
			return false;
		}
		MenuView rhs = (MenuView) object;
		return new EqualsBuilder().appendSuper(super.equals(object)).append(
				this.home, rhs.home).append(this.chuJing, rhs.chuJing).append(
				this.jingDianImageUrl, rhs.jingDianImageUrl).append(
				this.zhouBian, rhs.zhouBian)
				.append(this.jingDian, rhs.jingDian).append(
						this.trainingImageUrl, rhs.trainingImageUrl).append(
						this.anLi, rhs.anLi).append(this.chinese, rhs.chinese)
				.append(this.chuJingImageUrl, rhs.chuJingImageUrl).append(
						this.jiuDian, rhs.jiuDian).append(this.training,
						rhs.training).append(this.zhouBianImageUrl,
						rhs.zhouBianImageUrl).append(this.guoNei, rhs.guoNei)
				.append(this.jiuDianImageUrl, rhs.jiuDianImageUrl).append(
						this.guoNeiImageUrl, rhs.guoNeiImageUrl).append(
						this.anLiImageUrl, rhs.anLiImageUrl).append(
						this.english, rhs.english).isEquals();
	}
	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(-497895977, 87671677).appendSuper(
				super.hashCode()).append(this.home).append(this.chuJing)
				.append(this.jingDianImageUrl).append(this.zhouBian).append(
						this.jingDian).append(this.trainingImageUrl).append(
						this.anLi).append(this.chinese).append(
						this.chuJingImageUrl).append(this.jiuDian).append(
						this.training).append(this.zhouBianImageUrl).append(
						this.guoNei).append(this.jiuDianImageUrl).append(
						this.guoNeiImageUrl).append(this.anLiImageUrl).append(
						this.english).toHashCode();
	}
	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this).append("anLiImageUrl",
				this.anLiImageUrl).append("zhouBianImageUrl",
				this.zhouBianImageUrl).append("jiuDian", this.jiuDian).append(
				"jiuDianImageUrl", this.jiuDianImageUrl).append("chinese",
				this.chinese).append("jingDianImageUrl", this.jingDianImageUrl)
				.append("chuJing", this.chuJing).append("training",
						this.training).append("jingDian", this.jingDian)
				.append("anLi", this.anLi).append("trainingImageUrl",
						this.trainingImageUrl).append("home", this.home)
				.append("guoNei", this.guoNei).append("guoNeiImageUrl",
						this.guoNeiImageUrl).append("chuJingImageUrl",
						this.chuJingImageUrl).append("zhouBian", this.zhouBian)
				.append("english", this.english).toString();
	}
}
